NetChess is a program that allows you to play a game of chess with another Macintosh user over an AppleTalk network. You may play as many games simultaneously as there are other players on the network, and each game may be of any duration.
NetChess requires System 6.02 or later.
╩
NetChess is comprised of two files, a startup document and a Font/DA Mover document. The startup document is named NetChess and should be placed in the System Folder. The NetChess DA file contains a desk accessory that should be installed into your System file using Font/DA Mover. Once installed, you'll need to restart your Macintosh in order to play.
Using NetChess is simple and straightforward. Players challenge one another to a game of chess. For each game, NetChess determines which player is to play as white. Each player makes a move when it's his or her turn, and the game ends when a player is in checkmate, when a stalemate is reached, or when a player resigns. Players also have the option of ending a game by agreeing to a draw.
The first time you play against an opponent, NetChess will randomly determine who is to play as white. NetChess will thereafter award white to the player who last played as black.
Ñ The Main Dialog Box
When you choose NetChess from the desk accessory menu, a dialog box appears listing the names of all players on the network. Next to each name are one or more small icons that are used to represent your relationship with the player. The icons, taken together, can indicate whether or not a game is currently in progress with that player, and if so, whether the player is currently logged on the network, whose turn it is to move, and the respective colors for each player.
╩
If you are using NetChess on a large network, you might see another list immediately below the list of players just described. This is the zone list. From the user's standpoint, a zone is just a way of organizing a large network, and is similar to the way in which you organize the files on a disk into folders. You'll notice that when you select a new zone, the players list is updated to display the players who reside in that zone. Each zone is accompanied by one or more icons in much the same manner as with the players ╤ these icons indicate whether a zone is currently available, as well as whether or not the zone has a player with whom you are now or have once been engaged in play with.
If there is no game being played between you and a given player, selecting the player's name and clicking on the button titled ╥Play Game╙ constitutes challenging that player to a game. The player will be notified as to your challenge, and NetChess will advise you as to the player's response. If you select a player with whom you are currently engaged in play with, NetChess will open a window detailing the board position for this game and present a menu through which you may exercise certain options. NetChess will do nothing in the event you select a player whom you've already challenged to a game but have yet to receive a response.
Ñ Notification Preferences
The button titled ╥Prefs╔╙ in the main dialog will display a preferences dialog in which you may choose the method that NetChess will employ when it wants to notify you of an event. An event may occur when you are challenged to a new game by another player, when it's your move, or when your opponent offers a draw or resigns the game.
The default response to an event is for NetChess to automatically open. For example, if your opponent makes a move, NetChess will open the window detailing the current board position and display your opponent's move. If you are being challenged to a game of chess, NetChess will open and present you with a dialog on the opponent's behalf asking you if you want to play a game.
The second possible response is provided using one or more of the standard notification methods that are a part of the Macintosh's system software. These are the same means that the Alarm Clock DA and PrintMonitor employ to notify you of an event. You may choose to have NetChess display a small icon of a chess board along with the Apple in the desk accessory menu, play a sound, or display an alert box indicating the nature of the event.
╩
The last option is to simply have NetChess do nothing at all, by deselecting all of the above options. If you're engaged in play with, say, forty different players, this is sure to be the option you'll choose. Of course with this option you'll need to remember to every now and then open NetChess to see whether or not it's your move or whether you've been challenged to any new games.
If you choose to have NetChess automatically open in response to an event, any other options you have enabled are overridden, with the exception of playing a sound. The only time that they would be used by NetChess would be in the event the application you are working with is displaying a modal dialog box when NetChess wants to open. NetChess will not open when a modal dialog box is the foremost window ╤ a modal dialog box is defined here to be any window that prevents you from accessing the menus.
NetChess allows you to specify the way it responds to an event on a player by player basis. If you select a player from the main dialog and subsequently invoke the preferences dialog, a check box will appear in the lower right of the preferences dialog that, when selected, will display two radio-style buttons to the left. By selecting the top button, any preferences you set apply to all players ╤ this would be the same result had you not selected the check box to begin with. Selecting the bottom button enables you to specify the notification preferences for that player only ╤ these preferences will override the default preferences for events related to this player only. The same result can be achieved by choosing the ╥Preferences╔╙ item from the NetChess menu when a board window is open ╤ NetChess will allow you to specify preferences for the game whose board window was foremost when you made the menu selection.
Ñ Playing the Game
The board window is a small window representing the board position for a game. The arrow cursor indicates turn of play... if it's your turn, it will point upwards as usual. If it's your opponent's turn, it will be pointing downwards.
╩
To move a piece, click on it using the mouse and drag it to the square you want to move it to. If a piece won't move, it either means that it's not your turn, or that the piece has no legal moves available to it. It could be you're in check or that the piece is being pinned by one of your opponent's pieces.
To display all of a piece's legal moves, click on the piece with the command key depressed, or simply double click the piece. A beep will signify that there are no legal moves for the piece. Note that there is no ╥Undo╙ facility for moves... once you've made a move, you've made a move. You can think of this as a kind of inadvertent compliance with USCF regulations ╤ once you touch a piece, you are obliged to move that piece.
The ╥Last Move╙ selection from the NetChess menu will briefly display the board position as it existed prior to the last move. If you would like a more elaborate history of a game, choose the ╥Analyze╙ item from the NetChess menu. The Analyze option essentially allows you to retrace all the moves for a game, as well as explore different move combinations. The left and up arrow keys allow you to go backwards through the game, the down and right arrow keys allow you to go forwards. Command up or left will take you to the initial board position, command down or right will take you to the last board position. The return key will return the board to the way it was when you first invoked the Analyze option. Owners of keyboards that don't have arrow keys may instead use the comma and period keys with the command key depressed for moving backwards and forwards, respectively. Depressing the option key as well will take you to either the initial or last board position.
You may at any point try out different moves ╤ but keep in mind that NetChess will remember only one line of play. For example, if you trace backwards through a game for a number of moves, and then make a new move, the new board position will be the last board position available ╤ the subsequent moves are forgotten. You don't have to worry about messing up the game you are playing though, no matter what you do in Analyze mode, when you deselect the option everything returns to it's proper state. Your opponent cannot see any of the moves you are contemplating.
At the bottom of the window is a text field in which you may enter short messages to be sent to your opponent with each move you make. I'm not recommending this as an e-mail solution, but it can be nice to every so often punctuate a move with an ╥Aha!╙ or something to the effect. You can only enter text in this field when it is your move, and whatever text was in the field get's replaced by whatever your opponent enters after they've made their move.
Ñ Colors and Patterns
You have some control over the appearance of the chess board. If you are running NetChess on a color or gray-scale monitor, double clicking on a square with the option key depressed will present you with the standard color picker dialog allowing you to set the color for all of the squares of that color. Depressing the command key along with the option key will allow you to set the color for those squares as they appear when you display the legal moves for a piece. If you are running NetChess on a monochrome monitor, you will get a pattern selection dialog box in place of the color picker.
Additionally for color and gray-scale users, you can set the colors for the pieces as well, to some extent. Depressing the option key while double clicking on a piece will present you with two color picker dialogs. The first dialog allows you to specify the piece's maximum value, the second allows you to specify the piece's minimum value. You'll notice that the pieces have gradations, they appear as if they are being illuminated from the left (at least I tried to make them appear that way). A piece's maximum value represents the illuminated side of the piece, and the minimum value is it's shaded side. NetChess evenly spaces out the remaining values based on the minimum and maximum values you've entered. You should be able to adequately adjust the appearance of the board by adjusting both the colors for the squares as well as the colors for the pieces. You'll notice too that as you adjust the colors for the squares, the colors for the window itself gets updated as well.
Ñ Game File Information
When you first install NetChess, it creates a directory called NetChess Folder that it in turn places in the System Folder. NetChess saves information about each game that you play in this folder, under the name of the opponent you are playing. If you are playing an opponent in another zone, NetChess will create another folder named after that zone, place it in the NetChess Folder, and place the game's file in the zone's folder.
Each file consists of a resource fork and a data fork. NetChess uses the resource fork to store information it uses internally. NetChess uses the data fork as a text file where it will record all of the moves made by you and your opponent using algebraic notation. The file's type is set such that from within most any word processor or text editor you'll be able to open this file as a document and display it's contents. You'll notice the comments that both you and your opponent entered during the course of a game are recorded. Additionally, if during the course of a game, you make a move while depressing the option key, an exclamation point is placed next to the move in the text file so as to highlight it for future reference.
If you open the file using a word processor, you should refrain from making or saving any changes to the file, as the changes a word processor may make to the file will likely compromise NetChess's ability to use it. However, you may feel free to do as you please with a text editor, in particular, I find that increasing the tab spacing makes for a more readable listing.
Ñ Using Sound in NetChess
You'll notice when using NetChess that the sound I selected is a bit lacking. What's a good sound for chess? It reminds me of when I was on the chess team in high school. The administration apparently felt the need to patronize us, so they came up with this bizarre concept they called the "Chess Chickies" (I swear to god, that's what they called them). These were supposed to be mute cheerleaders who would do the cheering thing via the school's PA system every time we played. The idea of course was that since they were mute, we wouldn't be distracted by them. Then there was the invisible homecoming celebration╔
Anyway, there are no "NetChess Chickies". At least not in this version. However, there is the capability of adding your own sounds to NetChess, so that, for example, when an opponent makes a move you get to hear the opponent say something original like ╥Your move.╙
Every time NetChess is about to notify you as to an event, whether it's your opponent making a move, offering a draw or whatever, it looks for a sound ('snd ') resource with a certain name in the file NetChess maintains for the opponent. If it finds one, it will try to load the sound and play it. I've tried to set this up so that it's as simple as possible, and if you have access to Farallon's MacRecorder setup, it'll be a breeze.
There are twenty different sounds that can be played as the result of something your opponent does. You may choose to use any, all, or none. Following is a list of the names NetChess looks for, when they're played, and an example of what might be said if you're using MacRecorder to create the sound:
PLAY GAME
Played when a player challenges you to a game of chess.
"Wanna play a game?"
ACCEPT GAME
Played when you're notified that a player who you've challenged to a game of chess accepts.
"Ok."
REJECT GAME
Played when you're notified that a player who you've challenged to a game of chess declines.
"No thanks."
MAKE MOVE
Played when your opponent makes a move.
"Your move!"
MAKE GOOD MOVE
Played when your opponent makes a move with the option key depressed (described above, this also causes an exclamation point to be appended to the move in the text file).
"Aha!"
CHECK
Played when a move made by your opponent puts you in check.
"Check!"
CHECKMATE
Played when a move made by your opponent puts you in checkmate.
"Checkmate!"
ACCEPT MATE
Played when a move you've made puts your opponent in checkmate.
"Sigh."
REJECT MOVE
Played when NetChess senses a breakdown in protocol, i.e., your version of how the board should look doesn't agree with your opponent's.
"!@#%"
PROPOSE DRAW
Played when your opponent proposes a draw.
"Wanna call it a draw?"
ACCEPT DRAW
Played when your opponent accepts a draw that you proposed.
"Alright."
REJECT DRAW
Played when your opponent rejects a draw that you proposed.
"Nyet."
RESIGN GAME
Played when your opponent resigns.
"I give up."
ACCEPT RESIGNATION
Played when you resign.
"Gotcha again, sucka!"
I'M BACK
Played when your opponent logs on the network. Note that unless you include this sound you'll receive no other notification to this effect.
"I'm back!"
The remaining sounds are played when you select the player from the list in the main dialog.
YOUR MOVE
Played if it's your turn to move.
"Hurry up and move already!"
I'M THINKING
Played if it's your opponent's turn to move.
"Shhh. I'm thinking."
CONSIDER GAME
Played if you've challenged the player to a game, but the player has neither accepted or declined your challenge.
"Huh?"
SNORE
Played if the player is not logged on the network.
"Zzzz."
HELLO
Played if the player is logged on the network, but when there's no game in progress between you.
"Hi There!"
The easiest way to use sound in NetChess is for each player to create a resource file containing one or more 'snd ' resources with the above names. Resource ID's are not important. Each player would then simply make copies of the file and distribute them to other users on the network that they would likely engage in play with. If the network has a file server, you might try convincing the network administrator to create a folder on the server wherein players can put copies of their sound files so as to make them easily accessible to all.
Now all that needs to be done is for each player to copy the file containing another player's sounds into the appropriate folder. If the player is in the same zone, or if there are no zones at all, the file can be placed directly in the NetChess Folder. If the player is in another zone, place the file in the folder named after the zone. If the folder doesn't yet exist because you haven't yet played a game with anyone in that zone, go ahead and create it, then copy the file. The file name should be identical to the name the player entered using the Chooser. Spelling does count, though capitalization doesn't.
If NetChess has already created a file for that player, you've got one of two choices. If you are comfortable using a resource editor like ResEdit, go ahead and copy the sound resources from the sound file into the file NetChess created for that player. If you don't like that idea, you can delete the file NetChess created and replace it with the sound file, but if you do any game in progress will be compromised and you'll lose the saved text file of that game and all past games as well.
Creating these sound resources is easy if you've got MacRecorder and are using SoundEdit. Within SoundEdit, open a new window and record your sound. When you close the window or choose Save from the File menu, you'll get something close to the standard dialog most programs present you with when it's time to save a file. The important things to remember here are to save the sound as a resource by selecting the appropriate radio-style control at the bottom of the dialog and to save the resource under one of the above names (again, spelling is important, but capitalization isn't). The name of the file itself should be your name as you've entered it via the Chooser.
If you don't have MacRecorder, you can set up a sound file using ResEdit or any other utility that allows you to cut and paste sound resources out of and into separate files. The important thing to remember is that they have to be 'snd ' resources (the space at the end is important). And again, each resource should have one of the above listed names in order for NetChess to recognize it.
Some notes regarding the use of sound. Try to keep the sound resources small. No diatribes, no existential observations on the meaning of life, no favorite CD tracks. If you've got twenty sound files, each with twenty sound resources that are each twenty seconds worth of 22Khz sampled sound, you're not going to have much in the way of free disk space. Keep it short. The shorter it is, the more likely the sound will get played, as sufficient memory won't always be available for larger sounds.
Ñ PMSF & The ╥I'M BACK╙ Sound
The mechanism by which NetChess delivers messages from one player to another is reasonably robust, but it's not quite on the level of a file-server based e-mail system. NetChess requires that both you and your opponent both be ╥logged on╙ the AppleTalk network at the same time in order for messages to be delivered to one another. Note that this doesn't mean that you have to wait for your opponent to log on before you make a move. Here's a short illustration...
You are playing a game of chess with a co-worker we'll call Ignatz. Ignatz makes a move, and you are notified as such. Ignatz then decides to go home, and he turns off his Mac. You make a move. At this point of course, Ignatz's computer doesn't know anything about your move because it's off (A. I. hasn't been able to solve this one yet). You too decide to call it quits, and you turn off your Mac.
It's the next day and Ignatz arrives to work before you. He turns on his Mac, and opens up the game that the two of you have been playing. As far as Ignatz can see, it is still your turn. It won't be until you finally show up and turn on your Mac that NetChess will be able to transmit your move. This is what I like to call PMSF (pronounced 'pim╨sif), an acronym for ╥Poor Man's Store and Forward╙. A subsequent version of NetChess will take advantage of a file server if one is present, in which case in the previous scenario Ignatz would have known that it was his turn to move as soon as he turned his computer on.
Anyway, in the above scenario, the ╥I'M BACK╙ sound would NOT have played on Ignatz's machine when you turned your Mac on. When you turn on your Macintosh, at some point during startup NetChess will get called by the system and it will do some initialization in order to prepare for a day's worth of chess. During initialization, NetChess will look at each of the files representing other players on the network with whom you are engaged in chess with. When it finds a file with a move pending, as in the above scenario, it will simply reissue the move. In the above scenario, the move you had made the evening before had never been received by Ignatz, so when you turned your Mac on it was still pending.
Let's change the scenario. You're playing chess with Ignatz. Ignatz makes his move, and then you make your move while Ignatz is still logged on. Now, you turn off your Mac and you go home. Ignatz makes a move, turns off his Mac, and he goes home.
The move Ignatz made is pending ╤ it won't be delivered until both you and Ignatz are both logged on at the same time.
It's the next day, and Ignatz again shows up before you do. He turns on his Mac. NetChess will load, look at the file that represents your game and see that a move is pending. It will try to send you the move, but as you haven't yet made it to work, it won't be able to find you on the network and will soon give up. About an hour later, you finally show up and turn on your computer. NetChess will load, look at the file that represents your game with Ignatz and see that it's still waiting for a move from Ignatz. So it sends Ignatz the ╥I'M BACK╙ message. Ignatz's computer receives the message, plays the sound, and retransmits the move that has been pending. And all is well.
Ñ Random thoughts
According to the rules of play, there are three possible scenarios in which a stalemate can occur. NetChess only recognizes one, when a player can make no legal moves.
Certain startup documents and control panel devices that specialize in virus protection may cause NetChess more grief than it can take. NetChess needs to have the ability to set information relating to some of its resources during startup (in order to install the driver that handles AppleTalk). If your virus protection program allows you to set privileges on a program by program basis, give NetChess whatever privileges necessary so it can change it's own resources. Otherwise, you'll need to rename NetChess so that it executes before the virus utility. INIT's and cdev's are executed in alphabetical order.
You castle by dragging your king to the square which it would occupy after the castle is complete.
There are no bad moves. There are only better players.
An opponent's name is determined exclusively by the opponent's file name, and for opponents residing in zones other than your own, the zone name is determined exclusively by the name of the folder in which the file resides. Files which reside in the NetChess Folder itself are assumed to represent players which reside in your zone. So if your opponent changes his or her name, or changes zones, or if their zone name itself is changed, you can simply reflect these changes by changing the appropriate file/folder names/relationships using the Finder. Get that?
To prevent NetChess from loading at startup, either depress the shift key or hold down the mouse button when you think the startup document is about to execute. This takes practice.
The only reason I wrote this thing was because I was sick of losing to computers. With NetChess, I thought, I could play chess on a computer and have a decent chance at winning. That it hasn't necessarily turned out this way hasn't fazed me a bit. I'll always have the ╥Chess Chickies╙ on my side.
If you don't like the sound NetChess uses for notifications, delete it (you'll need ResEdit or the like). NetChess will use the sound you've selected via the Control Panel instead.
The NetChess desk accessory can be installed using Suitcase or Font/DA Juggler, if you're so inclined and equipped.
Ñ And now for a word to my sponsors╔
NetChess is shareware. What this means is that you may freely distribute it to anyone you'd like. You may not charge anything for NetChess by itself, although if you're an information service or a user group and you charge a nominal fee for distribution, that's OK. It also means that if you use NetChess, you're obligated to register.
This is version 1.5b1. The b stands for beta. What this means is that I've pretty much tested this thing on every system I could find. This includes the range of Macs from the Plus to the IIci. It hasn't been tested with the portable, nor the IIfx. It works on networks running with AppleShare and networks running with TOPS. It even works with Maze Wars. My major concern with NetChess at this point, and why I'm still calling it beta, is my inability to find a network with zones that I can test it on (does anyone have an internet router I can borrow?).
So here's the deal. If you use NetChess, I expect you to register. Registration is cheap. It's $10 per user, or $50 for all users on a network, or $100 for all users on an internet ╤ whichever's cheaper. My definition of an internet is simple, if NetChess gives you a zone list, you've got an internet. If five of you are on the same network and you've each registered with me individually, you can consider the entire network registered. Same goes for networks, two registered networks and the whole internet is registered.
You can pay using check or money order. New Jersey residents should kick in whatever the current sales tax is... as of this writing, I think they're about to increase it so I'm not sure what to tell you. 10% should cover it.
Registrants will receive notification as to when the next version of NetChess is ready. Optionally, if you enclose a floppy along with your registration fee, I'll just go ahead and send you the upgraded version instead.
If you find bugs in NetChess, PLEASE let me know. I won't expect you to register for something that has bugs, but I do expect that you let me know what they are. Or that you stop using the product.
Registration fees, bug reports, and comments can all be addressed to:
Donald Way
109 4th Street
Hoboken, NJ 07030
Thank you for your support.
Ñ Hacking NetChess with ResEdit
If you're into using ResEdit to customize programs, here are some things you can play with. I'm going to assume you have some technical familiarity with the Macintosh. The startup document contains some 'STR ' resources you might have the need to diddle with. 'STR ' ID #128 contains the entity type used when NetChess registers you on the network. NetChess also looks for this entity type when it does searches over the network. 'STR ' ID #129 contains the name NetChess uses to locate the NetChess Folder. If you don't like a cluttered System Folder, you can move the folder and prepend a path specification to the name in the resource so that NetChess can find it. 'STR ' ID #130 contains the name of the NetChess desk accessory. If you want to change the name of the desk accessory, you'll want to change this resource as well. You'll also want to change the driver's name contained within the 'DRVR' resource. 'STR ' ID #131 doesn't normally exist, but NetChess looks for it anyway. If it finds it, NetChess will use the string as the name by which it registers you on the network. Otherwise, it uses the name you've entered using the Chooser. This was useful for testing. In fact, if you don't have access to a network but would like to try out NetChess, you can do so by making two or more copies of both the startup document and desk accessory file. Give each set of files a unique name, and give the 'STR' ID's #129, #130, and #131 for each startup document corresponding names. You'll also need to give each 'DRVR' resource contained in each startup document a unique name. Then install each set. Your system will need AppleTalk version 48 or better, and the SetSelfSend option will need to be enabled in order for each copy of NetChess to recognize the other.
The values NetChess uses for timeout/retry information when using AppleTalk are kept in the 'P-K4' ID #2 resource found in the startup document. The resource consists of five pairs of two byte entries, where the first byte in each entry details the timeout interval and the second byte gives the retry count. The first pair is used when registering on the network, the second for confirming names on the network, the third for looking up names, the fourth for sending requests, and the fifth for looking up zones. This can be useful if you're in an unusual situation, like maybe if you're using a modem to gain access to a network, where you may need to extend the timeout interval somewhat. Or maybe you're on a really busy network, so bumping up the retry count is in order.
The pieces used in NetChess belong to the desk accessory and are composed of 'CURS' and 'crsr' resources. Feel free to hack away at the 'CURS' resources, but use some caution with the 'crsr' resources. The most important thing to remember is that all of the pieces of each color (i.e., the white pieces and the black pieces) must have the same number of color entries. If they don't and you then try to change their colors from within NetChess, bad things will happen. The very first and very last entries in each 'crsr' resource should be white and black respectively. When the user sets the color for the pieces, NetChess uses the entered values for the second, and second from last, color entries ╤ all of the other color entries in between are averaged on these values, and are set for all pieces of that color. So when you design your own pieces, use the same color table for each ╤ that way you won't get any unexpected display anomalies when changing their color from within the DA.
Finally, for color and gray-scale systems, NetChess will colorize it's windows using the colors specified for the squares. I thought that this would be a nice idea, but you may not. If you have your own idea as to how the window should be colored, simply stick a 'wctb' resource with local ID #0 in the desk accessory. NetChess looks for this resource, and if it finds one it will relinquish any ideas it may have for how it should color it's windows and allow the system to take care of it. It will also override the system highlight color that it uses when selecting message text in a board window with the color you've specified in the 'wctb' resource with a part code of 3 (wHiliteColor).
Finally, if you do change resources in the program, please refrain from distributing the diddled version, or if you do, please distribute the undiddled version along with it and clearly indicate which is which. This makes life easier for everybody.